<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改位移日志')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-log-edit" th:object="${weiyiLog}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">设备编号：</label>
                <div class="col-sm-8">
                    <input name="deviceId" th:field="*{deviceId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">电量：</label>
                <div class="col-sm-8">
                    <input name="batteryVal" th:field="*{batteryVal}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">错误数量：</label>
                <div class="col-sm-8">
                    <input name="readErrNum" th:field="*{readErrNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">ID：</label>
                <div class="col-sm-8">
                    <input name="idValue" th:field="*{idValue}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">ADC：</label>
                <div class="col-sm-8">
                    <input name="adcValue" th:field="*{adcValue}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">位移量：</label>
                <div class="col-sm-8">
                    <input name="offsetMm" th:field="*{offsetMm}" class="form-control" type="text" required placeholder="单位：毫米">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">位方向：</label>
                <div class="col-sm-8">
                    <input name="orientation" th:field="*{orientation}" class="form-control" type="text" required placeholder="1代表前进   0代表后退">
                </div>
            </div>
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">操作时间：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="input-group date">-->
<!--                        <input name="operateTime" th:value="${#dates.format(weiyiLog.operateTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!--                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "biz/log";
        $("#form-log-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-log-edit').serialize());
            }
        }

        $("input[name='operateTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>
